home *** CD-ROM | disk | FTP | other *** search
/ PC-X 1997 October / pcx14_9710.iso / swag / delphi.swg / 0186_Navigating a Multiselected Listbox.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-11-29  |  337 b   |  14 lines

  1.  
  2. This example shows a message for every element in a listbox that
  3. has been selected by the user.
  4.  
  5. procedure TForm1.Button1Click(Sender: TObject);
  6. var
  7.   Loop: Integer;
  8. begin
  9.   for Loop := 0 to Listbox1.Items.Count - 1 do begin
  10.     if Listbox1.Selected[Loop] then
  11.       ShowMessage(Listbox1.Items.Strings[Loop]);
  12.   end;
  13. end;
  14.